package com.diy.sigmund.diycommon.designpatterns.command;

/**
 * @author ylm-sigmund
 * @since 2022/2/9 10:34
 */
public class LightOffCommand implements Command{
    Light light;

    public LightOffCommand(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
}
